/**
 * <copyright>
 * </copyright>
 *
 * $Id$
 */
package EA_Model.IEC61970.Generation.Production.impl;

import EA_Model.IEC61970.Core.impl.PowerSystemResourceImpl;

import EA_Model.IEC61970.Domain.ActivePower;

import EA_Model.IEC61970.Generation.Production.CombinedCyclePlant;
import EA_Model.IEC61970.Generation.Production.ProductionPackage;

import org.eclipse.emf.common.notify.Notification;

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;

import org.eclipse.emf.ecore.impl.ENotificationImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model object '<em><b>Combined Cycle Plant</b></em>'.
 * <!-- end-user-doc -->
 * <p>
 * The following features are implemented:
 * <ul>
 *   <li>{@link EA_Model.IEC61970.Generation.Production.impl.CombinedCyclePlantImpl#getCombCyclePlantRating <em>Comb Cycle Plant Rating</em>}</li>
 * </ul>
 * </p>
 *
 * @generated
 */
public class CombinedCyclePlantImpl extends PowerSystemResourceImpl implements CombinedCyclePlant {
	/**
	 * The cached value of the '{@link #getCombCyclePlantRating() <em>Comb Cycle Plant Rating</em>}' reference.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @see #getCombCyclePlantRating()
	 * @generated
	 * @ordered
	 */
	protected ActivePower combCyclePlantRating;

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	protected CombinedCyclePlantImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return ProductionPackage.Literals.COMBINED_CYCLE_PLANT;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePower getCombCyclePlantRating() {
		if (combCyclePlantRating != null && combCyclePlantRating.eIsProxy()) {
			InternalEObject oldCombCyclePlantRating = (InternalEObject)combCyclePlantRating;
			combCyclePlantRating = (ActivePower)eResolveProxy(oldCombCyclePlantRating);
			if (combCyclePlantRating != oldCombCyclePlantRating) {
				if (eNotificationRequired())
					eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProductionPackage.COMBINED_CYCLE_PLANT__COMB_CYCLE_PLANT_RATING, oldCombCyclePlantRating, combCyclePlantRating));
			}
		}
		return combCyclePlantRating;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ActivePower basicGetCombCyclePlantRating() {
		return combCyclePlantRating;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public void setCombCyclePlantRating(ActivePower newCombCyclePlantRating) {
		ActivePower oldCombCyclePlantRating = combCyclePlantRating;
		combCyclePlantRating = newCombCyclePlantRating;
		if (eNotificationRequired())
			eNotify(new ENotificationImpl(this, Notification.SET, ProductionPackage.COMBINED_CYCLE_PLANT__COMB_CYCLE_PLANT_RATING, oldCombCyclePlantRating, combCyclePlantRating));
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public Object eGet(int featureID, boolean resolve, boolean coreType) {
		switch (featureID) {
			case ProductionPackage.COMBINED_CYCLE_PLANT__COMB_CYCLE_PLANT_RATING:
				if (resolve) return getCombCyclePlantRating();
				return basicGetCombCyclePlantRating();
		}
		return super.eGet(featureID, resolve, coreType);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eSet(int featureID, Object newValue) {
		switch (featureID) {
			case ProductionPackage.COMBINED_CYCLE_PLANT__COMB_CYCLE_PLANT_RATING:
				setCombCyclePlantRating((ActivePower)newValue);
				return;
		}
		super.eSet(featureID, newValue);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public void eUnset(int featureID) {
		switch (featureID) {
			case ProductionPackage.COMBINED_CYCLE_PLANT__COMB_CYCLE_PLANT_RATING:
				setCombCyclePlantRating((ActivePower)null);
				return;
		}
		super.eUnset(featureID);
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	@Override
	public boolean eIsSet(int featureID) {
		switch (featureID) {
			case ProductionPackage.COMBINED_CYCLE_PLANT__COMB_CYCLE_PLANT_RATING:
				return combCyclePlantRating != null;
		}
		return super.eIsSet(featureID);
	}

} //CombinedCyclePlantImpl
